package com.system.controller;

import com.system.pojo.Users;
import com.system.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class UsersController {
    @Autowired
    private UsersService usersService;

    @RequestMapping("selectUsersShuttle")
    @ResponseBody
    public String selectUsersShuttle() {
        return usersService.selectUsersShuttle();
    }

    @RequestMapping("updateUsersRole")
    @ResponseBody
    public String updateUsersRole(@RequestBody List<Users> usersList) {
        return usersService.updateUsersRole(usersList);
    }

    public UsersService getUsersService() {
        return usersService;
    }

    public void setLoginUserService(UsersService userService) {
        this.usersService = userService;
    }
}
